paned: Remove assertion in get_child_property
authorTimm Bäder <mail@baedert.org>
Mon, 26 Jun 2017 10:02:17 +0000 (12:02 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:14 +0000 (21:27 -0400)
Passing the third child (the pane separator) is possible and shouldn't
cause the process to abort.

gtk/gtkpaned.c

index 463a8c8d3b9f9cca8d9e0fc8361398c25c6f88ce..887999fd63599c351ac93cd4aab24d9f8c1e9128 100644 (file)
@@ -965,8 +965,10 @@ gtk_paned_get_child_property (GtkContainer *container,
   GtkPaned *paned = GTK_PANED (container);
   GtkPanedPrivate *priv = paned->priv;
 
-  g_assert (child == priv->child1 || child == priv->child2);
-  
+  if (child != priv->child1 &&
+      child != priv->child2)
+    return;
+
   switch (property_id)
     {
     case CHILD_PROP_RESIZE: